<!DOCTYPE html>
<html>

<head>
    <!-- 页面meta -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>订单管理</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no" name="viewport">
    <link rel="stylesheet" href="../../../statics/common/plugins/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="../../../statics/common/plugins/adminLTE/css/AdminLTE.css">
    <link rel="stylesheet" href="../../../statics/common/plugins/adminLTE/css/skins/_all-skins.min.css">
    <link rel="stylesheet" href="../../../statics/common/css/style.css">
    <script src="../../../statics/common/plugins/jQuery/jquery-2.2.3.min.js"></script>
    <script src="../../../statics/common/plugins/bootstrap/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="../../../statics/common/plugins/angularjs/angular.min.js"></script>

    <!-- 分页组件开始 -->
    <script src="../../../statics/common/plugins/angularjs/pagination.js"></script>
    <link rel="stylesheet" href="../../../statics/common/plugins/angularjs/pagination.css">
    <!-- 分页组件结束 -->

    <script type="text/javascript" src="../../../statics/common/js/base_pagination.js"></script>
    <script type="text/javascript" src="../../../statics/common/js/service/orderService.js"></script>
    <script type="text/javascript" src="../../../statics/common/js/controller/baseController.js"></script>
    <script type="text/javascript" src="../../../statics/common/js/controller/orderController.js"></script>

</head>

<body class="hold-transition skin-red sidebar-mini" ng-app="pinyougou" ng-controller="orderController">
<!-- .box-body -->
<div class="box box-primary">
    <div class="box-header with-border">
        <h3 class="box-title">订单管理</h3>
    </div>

    <div class="box-body">

        <!-- 数据表格 -->
        <div class="table-box">

            <!--工具栏-->

            <div class="box-tools pull-right">
                <div class="has-feedback">
                    订单id：<input ng-model="searchEntity.orderId">
                    状态：
                    <input ng-model="searchEntity.status" type="radio" value=""/>全部
                    <input ng-model="searchEntity.status" type="radio" value="1"/>未付款
                    <input ng-model="searchEntity.status" type="radio" value="2"/>交易关闭
                    <input ng-model="searchEntity.status" type="radio" value="3"/>已付款
                    <input ng-model="searchEntity.status" type="radio" value="4"/>已发货
                    <input ng-model="searchEntity.status" type="radio" value="5"/>交易成功
                    <input ng-model="searchEntity.status" type="radio" value="6"/>待评价
                    <input ng-model="searchEntity.status" type="radio" value="7"/>已评价
                    <button class="btn btn-default" ng-click="reloadList()">查询</button>
                    <button class="btn btn-default" onclick="window.location.reload();">刷新</button>
                </div>
            </div>
            <!--工具栏/-->

            <!--数据列表-->
            <table id="dataList" class="table table-bordered table-striped table-hover dataTable">
                <thead>
                <tr>
                    <th class="" style="padding-right:0px">
                        <input id="selall" type="checkbox" class="icheckbox_square-blue">
                    </th>
                    <th class="sorting_asc">订单编号</th>
                    <th class="sorting">支付类型</th>
                    <th class="sorting">实付金额</th>
                    <th class="sorting">发票类型</th>
                    <th class="sorting">状态</th>
                    <th class="text-center">操作</th>
                </tr>
                </thead>
                <tbody>
                <tr ng-repeat="entity  in  list">
                    <td><input type="checkbox"></td>
                    <td>{{entity.orderId}}</td>
                    <td>{{paymentType[entity.paymentType]}}</td>
                    <td>{{entity.payment}}</td>
                    <td>{{invoiceType[entity.invoiceType]}}</td>
                    <td>{{status[entity.status]}}</td>
                    <td class="text-center">
                        <button type="button" class="btn bg-olive btn-xs" data-toggle="modal" data-target="#sellerModal"
                                ng-click="findOne(entity.orderId)">详情
                        </button>
                        <button ng-click="findOne(entity.orderId)" type="button" class="btn bg-olive btn-xs"
                                data-toggle="modal" data-target="#editModal">
                            发货
                        </button>
                    </td>
                </tr>

                </tbody>
            </table>
            <!--数据列表/-->
            <!--数据列表/-->
            <tm-pagination conf="paginationConf"></tm-pagination>

        </div>
        <!-- 数据表格 /-->

    </div>
    <!-- /.box-body -->

    <!-- 编辑窗口 -->
    <div class="modal fade" id="editModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel1"
         aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                    <h3 id="myModalLabel1">填写物流信息</h3>
                </div>
                <div class="modal-body">
                    <table class="table table-bordered table-striped" width="800px">
                        <tr>
                            <td>物流名称</td>
                            <td><input class="form-control" placeholder="物流名称" ng-model="entity.shippingName"></td>
                        </tr>
                        <tr>
                            <td>物流单号</td>
                            <td><input class="form-control" placeholder="物流单号" ng-model="entity.shippingCode"></td>
                        </tr>
                        <tr>
                            <td>邮费</td>
                            <td><input class="form-control" placeholder="邮费" ng-model="entity.postFee"></td>
                        </tr>
                    </table>
                </div>
                <div class="modal-footer">
                    <button class="btn btn-success" data-dismiss="modal" aria-hidden="true" ng-click="save()">确认发货
                    </button>
                    <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">关闭</button>
                </div>
            </div>
        </div>
    </div>

    <!-- 订单详情 -->
    <div class="modal fade" id="sellerModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
         aria-hidden="true">
        <div class="modal-dialog modal-lg">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                    <h3 id="myModalLabel">订单详情</h3>
                </div>
                <div class="modal-body">
                    <ul class="nav nav-tabs">
                        <li class="active"><a href="#home" data-toggle="tab">买家信息</a></li>
                        <li><a href="#linkman" data-toggle="tab">物流信息</a></li>
                        <li><a href="#certificate" data-toggle="tab">时间节点</a></li>
                    </ul>
                    <!-- 选项卡开始 -->
                    <div id="myTabContent" class="tab-content">
                        <div class="tab-pane active in" id="home">
                            <br>
                            <table class="table table-bordered table-striped" width="800px">
                                <tr>
                                    <td>买家昵称</td>
                                    <td>{{entity.buyerNick}}</td>
                                </tr>
                                <tr>
                                    <td>买家留言</td>
                                    <td>{{entity.buyerMessage}}</td>
                                </tr>
                                <tr>
                                    <td>收货人</td>
                                    <td>{{entity.receiver}}</td>
                                </tr>
                                <tr>
                                    <td>收货人手机</td>
                                    <td>{{entity.receiverMobile}}</td>
                                </tr>
                                <tr>
                                    <td>收货人地区</td>
                                    <td>{{entity.birthday}}</td>
                                </tr>
                            </table>
                        </div>
                        <div class="tab-pane fade" id="linkman">
                            <br>
                            <table class="table table-bordered table-striped">
                                <tr>
                                    <td>物流名称</td>
                                    <td>{{entity.shippingName}}</td>
                                </tr>
                                <tr>
                                    <td>物流单号</td>
                                    <td>{{entity.shippingCode}}</td>
                                </tr>
                                <tr>
                                    <td>邮费</td>
                                    <td>{{entity.postFee}}</td>
                                </tr>
                            </table>
                        </div>
                        <div class="tab-pane fade" id="certificate">
                            <br>
                            <table class="table table-bordered table-striped">
                                <tr>
                                    <td>订单创建时间</td>
                                    <td>{{entity.createTime}}</td>
                                </tr>
                                <tr>
                                    <td>订单更新时间</td>
                                    <td>{{entity.updateTime}}</td>
                                </tr>
                                <tr>
                                    <td>付款时间</td>
                                    <td>{{entity.paymentTime}}</td>
                                </tr>
                                <tr>
                                    <td>发货时间</td>
                                    <td>{{entity.consignTime}}</td>
                                </tr>
                                <tr>
                                    <td>确认收货时间</td>
                                    <td>{{entity.endTime}}</td>
                                </tr>
                                <tr>
                                    <td>交易关闭时间</td>
                                    <td>{{entity.closeTime}}</td>
                                </tr>
                            </table>
                        </div>
                    </div>
                    <!-- 选项卡结束 -->
                </div>
                <div class="modal-footer">
                    <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">关闭</button>
                </div>
            </div>
        </div>
    </div>
</div>

</body>

</html>